<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-color.css">
    <link rel="stylesheet" href="css/appcan.icon.css">
    <link rel="stylesheet" href="css/appcan.control.css">
    <link rel="stylesheet" href="css/media.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/swiper-3.4.2.min.css">
 
    <style type="text/css">
        .bdr {
            border: 1px solid red;
        }
        .b_r {
            border-radius: 50%;
        }
        .htp80 {
            height: 80%;
        }
        .mrat {
            margin: 0 auto;
        }
        .bc2398F5 {
            background-color: #2398F5;
        }
        .bcE84D93 {
            background-color: #E84D93;
        }
        .bcFF7119 {
            background-color: #FF7119;
        }
        .bcF17474 {
            background-color: #F17474;
        }
        .bc3578C4 {
            background-color: #3578C4;
        }
        .bc39C2E1 {
            background-color: #39C2E1;
        }
        .bcE55338 {
            background-color: #E55338;
        }
        .bcBD49FC {
            background-color: #BD49FC;
        }
        .bcFC9B28 {
            background-color: #FC9B28;
        }
        .bc66FFCC{
            background-color: #66FFCC;
        }
        .bcCC3366{
            background-color: #CC3366; 
        }
        .bc9933FF{
            background-color: #9933FF;
        }
        .bc9999FF{
            background-color: #9999FF;
        }  
        .bcCC6600{
            background-color: #CC6600;
        }
        .bc00CC99{
            background-color: #00CC99;
        }
        .bcwhite {
            background-color: white;
        }
        .folders {
            display: none;
        }
        .swiperImg {
            width: 100%;
        }
    </style>

    <div class="ub-ver bcwhite" id="content">
        <!--- 轮播开始 --->
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide">
                    <img class="swiperImg" src="./images/loading_pic1.png">
                </div>
                <div class="swiper-slide">
                    <img class="swiperImg" src="./images/loading_pic1.png">
                </div>
                <div class="swiper-slide">
                    <img class="swiperImg" src="./images/loading_pic1.png">
                </div>
            </div>
            <div class="swiper-pagination"></div>
        </div>
        <!--- 轮播结束 --->
        <!--- Folders start --->
        <div class="pt5 pb5">
            <div class="" id="FoldersWrap1">
                <div class="ub">
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc2398F5">
                                <img class="wtp60 mt8" src="./images/zhenggongzhichuang.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcE84D93">
                                <img class="wtp60 mt8" src="./images/jijiangongzuo.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcFF7119">
                                <img class="wtp60 mt8" src="./images/anquanshiwu.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="pt5" id="FoldersWrap2">
                <div class="ub">
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcF17474">
                                <img class="wtp60 mt8" src="./images/bumenshengchan.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc3578C4">
                                <img class="wtp60 mt8" src="./images/fuwuzhichuang.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc39C2E1">
                                <img class="wtp60 mt8" src="./images/shichangaige.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="pt5" id="FoldersWrap3">
                <div class="ub">
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcE55338">
                                <img class="wtp60 mt8" src="./images/renshiguanli.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcBD49FC">
                                <img class="wtp60 mt8" src="./images/xingfujiayuan.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcFC9B28">
                               <img class="wtp60 mt8" src="./images/houqinbaozhang.png">
                            </div>  
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>       
                    </div>
                </div>
            </div>
            <div class="pt5" id="FoldersWrap4">
                <div class="ub">
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc66FFCC">
                                <img class="wtp60 mt8" src="./images/gongfenjiangfa.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcCC3366">
                                <img class="wtp60 mt8" src="./images/shengchanyunxing.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc9933FF">
                               <img class="wtp60 mt8" src="./images/SLA.png">
                            </div>  
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>       
                    </div>
                </div>
            </div>
            <div class="pt5" id="FoldersWrap5">
                <div class="ub">
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc9999FF">
                                <img class="wtp60 mt8" src="./images/caozuoshouce.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bcCC6600">
                                <img class="wtp60 mt8" src="./images/yuebao.png">
                            </div>
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>
                    </div>
                    <div class="wtp33">
                        <div class="ub-ver folders" onclick="queryContentsList(this)">
                            <div class="w40 h40 tx-c b_r mrat bc00CC99">
                               <img class="wtp60 mt8" src="./images/baogao.png">
                            </div>  
                            <div class="tx-c mt3 fs9" id="title"></div>
                        </div>       
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--- Folders finish --->
    
    <script src="js/appcan.js?v=111222"></script>
    <script src="js/appcan.control.js?v=111222"></script>
    <script src="js/common.js?v=1112221223232323232"></script>
    <script src="js/swiper-3.4.2.jquery.min.js?v=111222"></script>      
    
    </body>
    
    <script>
       /*
        * 轮播插件启动 mySwiper
        */
    var mySwiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        autoplayDisableOnInteraction: false,
        autoplay: 2000
        });
 //alert("zh_yddfUrl");
   var  zh_yddfUrl = h_yddfUrl + "yddfMAS/";
    
    appcan.ready(function () {
        
        appcan.locStorage.remove('abnormal');
        appcan.locStorage.remove('attitle');
        
        appcan.locStorage.setVal('http', zh_yddfUrl);
        
        var bmtgName = appcan.locStorage.getVal("yddf_bmtgName");
        var setId = appcan.locStorage.getVal("yddf_bmtgContentId");
        appcan.locStorage.setVal("attitle",bmtgName);
        
       if (bmtgName != '' && bmtgName != null && bmtgName != undefined) {
            
            uexWindow.evaluatePopoverScript("h_notice", "content", "delcommission('" + bmtgName + "','" + setId + "')");
            $.ajax({
                url: zh_yddfUrl + 'queryContentById',
                type: 'get',
                dataType: 'json',
                data: {
                    contentId: setId
                },
                success: function (res) {
                    var data = JSON.parse(res.queryContentById);
     
                    appcan.locStorage.setVal('detailInfoObj', res.queryContentById);
                    queryContentByIdCallBack();
                },
                error: function (err) {
                    console.log(err);
                }
                
            });
              appcan.locStorage.remove("yddf_bmtgName");
              appcan.locStorage.remove("yddf_bmtgContentId");  
                 

             function queryContentByIdCallBack() {
             
              var abnormal = 'abnormal';
              appcan.locStorage.setVal('status',abnormal);    
              appcan.window.open({
                name: 'BMTGqueryContentByIdDetailPage',
                dataType: 0,
                data: 'BMTGqueryContentByIdDetailPage.html',
                aniId: 5
            });
     
            return;
        }
      }
     
       
     
     
     
     
        /*
         *测试地址:            http://172.31.68.234:8080/portal/ws/newsWebService?wsdl
         *生产地址:            http://172.28.29.81:9080/portal/ws/newsWebService?wsdl
         *本地MAS：         http://127.0.0.1:8080/zyhBMTG/querySites?
         *服务器端MAS:     http://172.31.64.34:8011/sdk10098/public
         * 
         * @userId : 联合办公账号
         * @FUNCTION
         * queryFoldersByUserNameCallBack(fData) 服务器响应成功之后的回调;
         * @fData :　接口返回的内容
         * */
     
        var userId = "wangying69";
        //var userId = localStorage['MU30-lOGIN-USRNAME'];
        //alert(userId);
        appcan.window.openToast({
            msg: '正在努力加载...',
            duration: -1,
            position: 5,
            type: 1
        });
     
        $.ajax({
            url: zh_yddfUrl + 'querySites?',
            type: 'get',
            dataType: 'json',
            data: {
                userName: userId,
     
            },
            success: function (res) {
     
                //console.log(res);
                var fData = JSON.parse(res.queryFoldersByUserName);
                //alert(res.queryFoldersByUserName);
                queryFoldersByUserNameCallBack(fData);
            },
            error: function (err) {
     
                console.log(err);
            }
        });
     
        function queryFoldersByUserNameCallBack(fData) {
           
           //根据权限显示栏目信息
            var folders = $('.folders');
            //console.log(folders);
            for (var i = 0; i < 　fData.folders.length; i++) {
                //console.log(i);
                $(folders[i]).find('#title').text(fData.folders[i].folderName);
                $(folders[i]).css('display', 'block');
                $(folders[i]).attr('id', fData.folders[i].folderId);
                appcan.window.closeToast();
            }
        }
     
     
     
    });
     
    /*
     * @queryContentsList 栏目点击方法.
     * @id : folderId 上一接口获取的参数，根据ID查询栏目的内容列表.
     * @queryContentsCallBack(data) : 请求成功后回调
     * @data : 请求成功后返回的数据. 
     * @appcan.locStorage.setVal(key,val) 本地储存
     */
     
    function queryContentsList(self) {
        //IC.talkingDataCount("部门通告", "0010");
        // console.log(self.id);
        appcan.locStorage.setVal('title1', $(self).text().trim());
        appcan.locStorage.setVal('selfId', self.id);
        appcan.window.openToast('正在加载信息...', -1, 5, 0);
        $.ajax({
            url: zh_yddfUrl + 'queryContents?',
            type: 'get',
            dataType: 'json',
            data: {
                folderId: self.id,
                curPage: '0',
                pageSize: '15'
            },
            success: function (res) {
     
                var data = JSON.parse(res.queryContents);
                //console.log(data);
                queryContentsCallBack(data);
            },
            error: function (err) {
     
                console.log(err);
            }
     
        });
     
     
    }
     
    function queryContentsCallBack(data) {
     
        appcan.locStorage.setVal('dataContents', JSON.stringify(data.contents));
        appcan.window.closeToast();
        appcan.window.open({
            name: "BMTGqueryContents",
            dataType: 0,
            aniId: 5,
            data: "BMTGqueryContents.html",
     
        });
    }

    </script>
</html>
